import numpy as np
import os
import torch
import cv2

import matplotlib.pyplot as plt

def load_data():
    pass


path = './vertify'

folders = os.listdir(path)

for folder in folders:
    folders_path = path + '/' + folder
    files = os.listdir(folders_path)

    for file in files:
        name = folders_path + '/' + file
        print(file)
        data = np.load(name)
        print (data.shape)

        data = data.transpose(1,2,3,0)

        for frame in data:
            # rgb = cv2.resize(frame[:,:,0:3],(480,270))
            # rgb = cv2.cvtColor(rgb,cv2.COLOR_BGR2RGB)
            # cv2.imshow("rgb",rgb)
            rgbd = cv2.resize(frame[:, :, 0], (480, 270))
            cv2.imshow("depth",rgbd)

            cv2.waitKey(50)
        cv2.waitKey()